package com.kfm.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;

@Controller
public class MethodController {

    @GetMapping("/form")
    public String form(){
        return "form";
    }

    @DeleteMapping("/test/delete")
    public String delete(HttpServletRequest request){
        System.out.println(request.getMethod());
        return "hello";
    }

    @RequestMapping("/cors")
//    @CrossOrigin
    public String cors(){
        return "hello";
    }
}
